package com.xdtech.hotel.service;

import java.util.List;
import java.util.Map;

import com.xdtech.common.service.IBaseService;
import com.xdtech.hotel.model.Room;
import com.xdtech.hotel.vo.CustomerItem;
import com.xdtech.hotel.vo.RoomItem;

/**
 * 
 * @author max.zheng
 * @create 2015-04-01 22:53:23
 * @since 1.0
 * @see
 */
public interface RoomService extends IBaseService<Room>{

	/**
	 * 保存更新信息
	 * @author max.zheng
	 * @create 2015-04-01 22:53:23
	 * @modified by
	 * @param item
	 * @return
	 */
	boolean saveOrUpdateRoom(RoomItem item);

	/**
	 * 加载记录信息
	 * @author max.zheng
	 * @create 2015-04-01 22:53:23
	 * @modified by
	 * @param newId
	 * @return
	 */
	RoomItem loadRoomItem(Long roomId);

	/**
	 * 根据id号删除记录信息
	 * @author max.zheng
	 * @create 2015-04-01 22:53:23
	 * @modified by
	 * @param id
	 * @return
	 */
	boolean deleteRoomInfo(long id);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-04-01 22:53:23
	 * @modified by
	 * @param roomIds
	 */
	boolean deleteRoomInfo(List<Long> roomIds);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-4-1下午10:54:11
	 * @modified by
	 * @return
	 */
	List<RoomItem> loadAllRoomItems();

	/**
	 * 保存房间配置相关信息
	 * @author max.zheng
	 * @create 2015-4-6上午10:34:06
	 * @modified by
	 * @param roomItem
	 */
	void saveRoomInfos(RoomItem roomItem);

	/**
	 * 加载未选择的元件关联
	 * @author max.zheng
	 * @create 2015-4-6上午11:02:56
	 * @modified by
	 * @param roomType
	 * @return
	 */
	Map<String, Object> loadRoomUnSelectDeviceLinks(String roomId);

	/**
	 * 加载已选择的元件关联
	 * @author max.zheng
	 * @create 2015-4-6上午11:03:12
	 * @modified by
	 * @param roomType
	 * @return
	 */
	Map<String, Object> loadRoomSelectDeviceLinks(String roomId);

	/**
	 * 保存模版导入的客房信息
	 * @author max.zheng
	 * @create 2015-4-14下午10:02:33
	 * @modified by
	 * @param items
	 */
	String saveImportRoomInfos(List<RoomItem> items);

	/**
	 * 根据设备id集合获取客房列表
	 * @author max.zheng
	 * @create 2015-4-17下午9:38:35
	 * @modified by
	 * @param deviceIds
	 * @return
	 */
	List<Room> getRoomByDeviceIds(List<Long> deviceIds);

	/**
	 * 更新客房状态
	 * @author max.zheng
	 * @create 2015-4-18下午10:00:00
	 * @modified by
	 * @param roomId
	 * @param roomWorkOffStatus
	 */
	RoomItem roomUpdateStatus(Long roomId, String status,String customerName);

	/**
	 * 
	 * @author max.zheng
	 * @since 2015-5-5 下午1:48:45
	 * @param sn
	 * @return
	 */
	RoomItem loadRoomItemBySn(String sn);

	/**
	 * 检查房间编号是否重复
	 * @author max.zheng
	 * @create 2015-5-23下午7:15:16
	 * @modified by
	 * @param id
	 * @param roomNo
	 * @return
	 */
	boolean checkIsExsit(Long id, String roomNo);

	/**
	 * 检查房间绑定的RCU设备是否重复
	 * @author max.zheng
	 * @create 2015-5-23下午7:59:05
	 * @modified by
	 * @param valueOf
	 * @param roomDeviceName
	 * @return
	 */
	boolean checkRcuIsExit(Long valueOf, String roomDeviceName);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-6-23下午9:20:56
	 * @modified by
	 * @param cardId
	 * @return
	 */
	List<RoomItem> loadNotCardRooms(Long cardId);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-6-23下午9:21:02
	 * @modified by
	 * @param cardId
	 * @return
	 */
	List<RoomItem> loadUserRoles(Long cardId);
}
